package com.qiguliuxing.dts.core.type;

/**
 * 商品佣金设置类型的枚举类
 * 
 * @author CHENBO
 * @QQ 623659388
 * @since 1.0.0
 */
public enum GoodsBrokerageTypeEnum {

	GOODS_DEFAULT((byte) 0, "无推广佣金"), GOODS_SET((byte) 1, "自定义佣金"), APPLY_RATE((byte) 2, "系统审批比例");

	private Byte type;
	private String desc;

	private GoodsBrokerageTypeEnum(Byte type, String desc) {
		this.type = type;
		this.desc = desc;
	}

	public static GoodsBrokerageTypeEnum getInstance(Byte type2) {
		if (type2 != null) {
			for (GoodsBrokerageTypeEnum tmp : GoodsBrokerageTypeEnum.values()) {
				if (tmp.type.intValue() == type2.intValue()) {
					return tmp;
				}
			}
		}
		return null;
	}

	public Byte getType() {
		return type;
	}

	public void setType(Byte type) {
		this.type = type;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
